package com.smh.a03ExercisesDemo1;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class Test {
    public static void main(String[] args) {

        //随机点名

        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"asd","qwe","zxc","fgh");

        Random random = new Random();

        int index = random.nextInt(list.size());
        String s = list.get(index);
        System.out.println(s);


    }
}
